#include "EmptyKvTableFixture.h"
#include <iostream>
// replace tps  for kv-sqlite (MemoryDB, FileDB)
//OK:     whole sql (base)

class ReplaceMemoryDB : public MemoryDBWithEmptyTable {
public: 
};

BENCHMARK_DEFINE_F(ReplaceMemoryDB, wholeSql_SYNC_OFF_WAL_80K)(::benchmark::State & state) {
  action("PRAGMA synchronous = OFF;");
  action("PRAGMA journal_mode = WAL;");
  action("PRAGMA cache_size = 80000;");

	std::string sql = "replace into tab1 values(null, '12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678');";

	//std::cout << "before replace-sql--affectRows: " <<executeRetAffectRows(sql) << std::endl;

  for(auto _ : state){
      //action(sql);
  }

	//std::cout << "after replace-sql--affectRows: " << executeRetAffectRows(sql) << std::endl;
}

BENCHMARK_REGISTER_F(ReplaceMemoryDB, wholeSql_SYNC_OFF_WAL_80K)
  ->Unit(benchmark::kMillisecond)
  ->Iterations(10000);
